import request from "@/api/request";
import { setUserMsgI,getUserMsgI } from './types';
import { ElNotification } from 'element-plus'
export async function applyUserMsg (params:setUserMsgI){
    const res = await request("/user/register",params,"POST")
    if(res.status === 402){
        ElNotification({
            title: 'Warning',
            message: res.msg,
            type: 'warning',
          })
    }
    return res
}

export async function getUserMsg (params:getUserMsgI){
    const res = await request("/user/login",params,"POST")
    return res
}